<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>karmarkar</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : April 1993</div>
    <p>
      <b>karmarkar</b> -  karmarkar algorithm</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>[x1]=karmarkar(a,b,c,x0)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>a</b>
        </tt>: matrix (n,p)</li>
      <li>
        <tt>
          <b>b</b>
        </tt>:  n - vector</li>
      <li>
        <tt>
          <b>c</b>
        </tt>:  p - vector</li>
      <li>
        <tt>
          <b>x0</b>
        </tt>:  initial vector</li>
      <li>
        <tt>
          <b>eps</b>
        </tt>: threshold (default value : 1.d-5)</li>
      <li>
        <tt>
          <b>gamma</b>
        </tt>: descent step  <tt>
          <b>0&lt;gamma&lt;1</b>
        </tt> , default value : 1/4</li>
      <li>
        <tt>
          <b>x1</b>
        </tt>: solution</li>
      <li>
        <tt>
          <b>crit</b>
        </tt>: value of  c'*x1</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
    Computes <tt>
        <b>x</b>
      </tt> which minimizes</p>
    <pre>

                        c'*x
   
    </pre>
    <p>
    under constraints:</p>
    <pre>

                        a*x = b
                        x&gt;=0
   
    </pre>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

// n=10;p=20;
// a=rand(n,p);c=rand(p,1);x0=abs(rand(p,1));b=a*x0;x1=karmarkar(a,b,c,x0);
 
  </pre>
  </body>
</html>
